﻿
using BLL;
using models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace yuejilalala
{
    public partial class AddUser : System.Web.UI.Page
    {
        UserMarager marager = new UserMarager();
        User user = null;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            user = new User();
            user.Uid = tb_zh.Text;//账号
            user.Pwd = tb_mm.Text;//密码
            user.UName = tb_nc.Text;//昵称
            user.Sex = nan.Checked ? nan.Text : nv.Text;//性别
            user.Birthday = tb_sr.Text;//生日
            user.Phone =decimal.Parse( tb_dh.Text);//电话
            user.Email = tb_yx.Text;

            //新增用户
            if (marager.AddUser(user))
            {
                Response.Write("<script>alert('新增用户成功')<script>");
            }
           
        }
    }
}